package com.ruoyi.zikao.service.impl;

import java.util.Collections;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zikao.mapper.ZikaoOccupationMapper;
import com.ruoyi.zikao.domain.ZikaoOccupation;
import com.ruoyi.zikao.service.IZikaoOccupationService;

/**
 * 自考职业代码Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-16
 */
@Service
public class ZikaoOccupationServiceImpl implements IZikaoOccupationService 
{
    @Autowired
    private ZikaoOccupationMapper zikaoOccupationMapper;

    /**
     * 查询自考职业代码
     * 
     * @param code 自考职业代码主键
     * @return 自考职业代码
     */
    @Override
    public ZikaoOccupation selectZikaoOccupationByCode(String code)
    {
        return zikaoOccupationMapper.selectZikaoOccupationByCode(code);
    }

    @Override
    public List<ZikaoOccupation> selectZikaoOccupationAll() {
        return zikaoOccupationMapper.selectZikaoOccupationAll();
    }

    /**
     * 查询自考职业代码列表
     * 
     * @param zikaoOccupation 自考职业代码
     * @return 自考职业代码
     */
    @Override
    public List<ZikaoOccupation> selectZikaoOccupationList(ZikaoOccupation zikaoOccupation)
    {
        return zikaoOccupationMapper.selectZikaoOccupationList(zikaoOccupation);
    }

    /**
     * 新增自考职业代码
     * 
     * @param zikaoOccupation 自考职业代码
     * @return 结果
     */
    @Override
    public int insertZikaoOccupation(ZikaoOccupation zikaoOccupation)
    {
        return zikaoOccupationMapper.insertZikaoOccupation(zikaoOccupation);
    }

    /**
     * 修改自考职业代码
     * 
     * @param zikaoOccupation 自考职业代码
     * @return 结果
     */
    @Override
    public int updateZikaoOccupation(ZikaoOccupation zikaoOccupation)
    {
        return zikaoOccupationMapper.updateZikaoOccupation(zikaoOccupation);
    }

    /**
     * 批量删除自考职业代码
     * 
     * @param codes 需要删除的自考职业代码主键
     * @return 结果
     */
    @Override
    public int deleteZikaoOccupationByCodes(String[] codes)
    {
        return zikaoOccupationMapper.deleteZikaoOccupationByCodes(codes);
    }

    /**
     * 删除自考职业代码信息
     * 
     * @param code 自考职业代码主键
     * @return 结果
     */
    @Override
    public int deleteZikaoOccupationByCode(String code)
    {
        return zikaoOccupationMapper.deleteZikaoOccupationByCode(code);
    }
}
